<%@tag pageEncoding="UTF-8" isELIgnored="false"  %>
<style>
    .packetList {
        padding: 10px;
        text-align: left;
        color: #393D49;
    }

</style>

<script>
    function showPacketList(goodsName, packetGoodsVoList) {
        if (packetGoodsVoList==null || packetGoodsVoList==undefined || packetGoodsVoList.length<=0){
            return;
        }
        layui.use(['laytpl'], function () {
            let $ = layui.jquery,
                laytpl = layui.laytpl;

            var getTpl = packetList.innerHTML;
            laytpl(getTpl).render(packetGoodsVoList, function(html){
                layer.open({
                    type: 1
                    ,title: "套餐-"+goodsName
                    ,closeBtn: false
                    ,shadeClose:true
                    ,offset: 'auto'
                    ,area: ['300px','300px']
                    ,moveType: 0
                    ,shade: 0
                    ,id: 'packetListDialog' //设定一个id，防止重复弹出
                    ,btn: ['确认']
                    ,btnAlign: 'c'
                    ,content: html
                    ,success: function(layero){

                    }
                });
            });
        });
    }

</script>

<script type="text/html" id="packetList" >

    <div class="packetList">
        {{#  layui.each(d, function(index, item){ }}
        <p style="padding: 0 10px 0 10px;">{{item.goodsVo.name}}
            <p style="overflow: hidden;">
                <p style="float: left;color: #aaaaaa;padding: 0 10px 0 10px;">
                    {{item.number}} {{genUnitName(item.goodsVo.goodsUnitVoList,item.unitId)}}<span style="padding-left: 10px;">￥{{ getPrice(item.price) }}</span>
                </p>
                <p style="float: right;color: #aaaaaa;padding: 0 10px 0 10px;">总额￥{{ getPrice(item.amount) }}</p>
            </p>
        </p>
        <div style="clear:both;"></div>
        <div style="border-bottom:1px  #aaaaaa dashed;margin: 10px 0 10px 0"></div>
        {{#  }); }}
    </div>
</script>